home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / text / tex / texclean.lha / TeXClean.doc < prev   
Text File  |  1993-03-28  |  5KB  |  159 lines

  1. TeXClean:    Delete all files generated by TeX.
  2.         (Does not delete ".tex" files.)
  3.  
  4. Author:        Daniel J. Barrett
  5. E-mail:        barrett@cs.umass.edu
  6.  
  7. Status:        Public Domain.  Do whatever you want with this program.
  8.  
  9. Testing:    Any program that deletes files must be thoroughly tested.
  10.         I have been running this program regularly for over a year,
  11.         with no problems whatsoever.
  12.  
  13.         Source code is included so you can tailor this program to your
  14.         own needs.
  15.  
  16.  
  17. ABOUT THE PROGRAM
  18.  
  19.     TeXClean is a simple little program for deleting files generated
  20. by TeX or LaTeX.  Such files have names that end with dvi, aux, log, bbl,
  21. and so on.  It also deletes commonly-named temporary files like mfput.log
  22. and texput.log.
  23.  
  24.  
  25. SOME VOCABULARY BEFORE WE START
  26.  
  27.     Given a filename like "myfile.tex", I am going to be talking about
  28. two parts of the filename:
  29.  
  30.     The "root name":    the part before the dot (e.g., "myfile").
  31.     The "extension":    the part after (and including) the dot
  32.                 (e.g., ".tex").
  33.  
  34.  
  35. USING TEXCLEAN
  36.  
  37.     TeX and LaTeX generate all kinds of files:  dvi files, aux files,
  38. etc.  It is a pain to delete these by hand when you are done with them,
  39. especially since you do NOT want to delete the ".tex" file.  TeXClean deletes
  40. those files -- and ONLY those files -- generated by TeX/LaTeX from your
  41. ".tex" file.
  42.  
  43.     Usage is:
  44.  
  45.         1>  texclean file1 file2 file3 ...
  46.  
  47. You may list as many filenames as you like.  A filename may be:
  48.  
  49. o    The name of a ".tex" file:
  50.  
  51.         1>  texclean myfile.tex
  52.  
  53. o    The root name of a ".tex" file:
  54.  
  55.         1>  texclean myfile
  56.  
  57. o    The name of ANY file generated by TeX:
  58.  
  59.         1>  texclean myfile.aux
  60.  
  61. No matter which of these forms you use, the results are IDENTICAL.  TeXClean
  62. deletes ALL the TeX-generated files associated with the root name (in this
  63. case, "myfile").
  64.  
  65.    ** NOTE:  IT IS IMPOSSIBLE TO DELETE THE ".tex" FILE USING TEXCLEAN **
  66.  
  67.  
  68. SO, WHICH FILES GET DELETED?
  69.  
  70.     Simply type:
  71.  
  72.         1>  texclean
  73.  
  74. or
  75.         1>  texclean ?
  76.  
  77. to get a usage message, and a list of all file extensions which TeXClean
  78. considers "deletable" files.  DO THIS NOW do you know which files will
  79. be deleted.
  80.  
  81.                                 ==========
  82.  
  83.     At this point, I've said everything you "need" to know about using
  84. TeXClean.  The following information may be useful to people who are using
  85. alternate shells; you can skip it unless you want to learn a few tricks.
  86.  
  87.  
  88. USING TEXCLEAN WITH A SHELL THAT UNDERSTANDS WILDCARDS
  89.  
  90.     As I said above, TeXClean essentially ignores any suffixes that
  91. you give on the command line and deletes files associated with the root
  92. name.  This is useful if you have a shell that allows wildcards.  (TeXClean
  93. itself does not support Amiga wildcards/pattern matching.)  
  94. You can type (for example):
  95.  
  96.         1>  texclean #?.dvi
  97.  
  98. and this will delete all TeX-generated files (NOT JUST THE dvi FILES!)
  99. associated with the root names of the dvi files.  For example, suppose
  100. your directory contained:
  101.  
  102.         file1.tex    file2.tex    file3.tex
  103.         file1.aux    file2.aux    file3.aux
  104.         file1.log    file2.log    file3.log
  105.         file1.dvi    file2.dvi    file3.dvi
  106.  
  107. If you type (assuming your shell supports standard Amiga wildcards):
  108.  
  109.         1> texclean #?.dvi
  110.  
  111. it will delete all these files except file1.tex, file2.tex, and file3.tex.
  112.  
  113.     As a further example, ALL of the following commands will have the
  114. same effect as the one in the example above:
  115.  
  116.         1>  texclean #?.log
  117.         1>  texclean #?.tex
  118.         1>  texclean file1 file2 file3
  119.         1>  texclean file1 file2.log file3.dvi
  120.         1>  texclean file1.tex file?.dvi
  121.  
  122.     Now, you might think that this program behavior is strange.  For
  123. instance, if the user types:
  124.  
  125.         1>  texclean #?.dvi
  126.  
  127. shouldn't TeXClean just delete the dvi files?  Well, if you want that
  128. behavior, just use the standard Delete command!!!
  129.  
  130.         1>  delete #?.dvi
  131.  
  132. TeXClean does it differently because Delete already gives you that
  133. capability.  The purpose of TeXClean is to delete *all* TeX-generated
  134. files in one quick command.
  135.  
  136.  
  137. WHAT TO DO IF YOUR SHELL DOES NOT UNDERSTAND WILDCARDS
  138.  
  139.     You can achieve similar results to those in the previous section
  140. using the "List" command with the QUICK and NOHEAD options, combined with
  141. the backtick.  (You must be running AmigaDOS 2.0 or higher for this.)
  142. For example:
  143.  
  144.         1>  texclean `list quick nohead #?.dvi`
  145.  
  146. I'm not going to take the time to explain this; see your AmigaDOS and Shell
  147. documentation for more information on what this command is doing.
  148.  
  149.  
  150. USING TEXCLEAN WITH WSHELL 2.0
  151.  
  152.     I use the following handy macro in S:Config-FComp for filename
  153. completion of texclean commands:
  154.  
  155.   COMMAND texclean PAT "#?.dvi" FMT "%f%r0%l %r1%l %r2%l %r3%l %r4%l %r5%l"
  156.  
  157. This matches files ending with ".dvi" and strips off the suffix, and
  158. matches up to 5 different files at once.
  159.